
<UserControl x:Class="IBR.StringResourceBuilder2011.SRBControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Name="SRB"
             Background="{DynamicResource {x:Static vsfx:VsBrushes.ToolWindowBackgroundKey}}"
             IsVisibleChanged="StringResBuilderWindow_IsVisibleChanged">
  
  <UserControl.Resources>
    <!--DataGrid-->
    <Style TargetType="DataGrid">
      <Setter Property="AutoGenerateColumns" Value="False"/>
      <Setter Property="CanUserResizeColumns" Value="True"/>
      <Setter Property="CanUserReorderColumns" Value="False"/>
      <Setter Property="CanUserSortColumns" Value="False"/>
      <Setter Property="CanUserAddRows" Value="False"/>
      <Setter Property="CanUserDeleteRows" Value="False"/>
      <Setter Property="CanUserResizeRows" Value="True"/>
      <Setter Property="SelectionMode" Value="Single"/>
      <Setter Property="SelectionUnit" Value="Cell"/>
      <Setter Property="Background" Value="White"/>
      <Setter Property="RowBackground" Value="White"/>
      <Setter Property="AlternatingRowBackground" Value="#08000000"/>
      <Setter Property="AlternationCount" Value="2"/>
      <Setter Property="HorizontalGridLinesBrush" Value="#FFF0F0F0"/>
      <Setter Property="VerticalGridLinesBrush" Value="#FFF0F0F0"/>
      <!--<Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>-->
    </Style>
    <!-- make selection background blue even when DataGrid is unfocused (VS2012) -->
    <Style x:Key="CellStyle" TargetType="{x:Type DataGridCell}">
      <Style.Triggers>
        <Trigger Property="IsSelected" Value="True">
          <Setter Property="Background" Value="#FF3399FF" />
        </Trigger>
      </Style.Triggers>
    </Style>
    <!--StatusBar-->
    <Style TargetType="StatusBar">
      <Setter Property="Background" Value="#FFBCC7D8"/>
      <Setter Property="VerticalContentAlignment" Value="Bottom"/>
    </Style>
  </UserControl.Resources>
  
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <DataGrid Grid.Row="1" Name="dataGrid1" SelectedCellsChanged="dataGrid1_SelectedCellsChanged" MouseDoubleClick="dataGrid1_MouseDoubleClick" GotFocus="dataGrid1_GotFocus" CellStyle='{StaticResource CellStyle}'>
      <DataGrid.Columns>
        <DataGridTextColumn Header="Name" Width="*" Binding="{Binding Path=Name}"/>
        <DataGridTextColumn Header="Text" Width="2*" IsReadOnly="True" Binding="{Binding Path=Text}"/>
        <DataGridTextColumn Header="Location" Width="Auto" IsReadOnly="True" Binding="{Binding Path=Location}"/>
      </DataGrid.Columns>
    </DataGrid>
    <StatusBar Grid.Row="2" Name="statusBar1">
      <StatusBarItem>
        <ProgressBar Name="progressBar1" Width="200" Height="20" />
      </StatusBarItem>
    </StatusBar>
  </Grid>
</UserControl>